package Cafezam;

import java.util.Scanner;

public class J08Sungjuk {
	public static void main(String[] args) {
		// 변수선언
		String name[] = new String[4];
		Scanner sc = new Scanner(System.in);
		String result = "";
		int kor[] = new int[4];
		int eng[] = new int[4];
		int mat[] = new int[4];
		int tot[] = new int[4];
		char grd[] = new char[4];
		double avg[] = new double[4];
		// 입력및 성적처리
		for (int i = 1; i <= 3; i++) {
			System.out.println(i + "번째 성적의 학생 이름은?");
			name[i] = sc.next();
			System.out.println("국어성적은?");
			kor[i] = sc.nextInt();
			System.out.println("영어성적은?");
			eng[i] = sc.nextInt();
			System.out.println("수학성적은?");
			mat[i] = sc.nextInt();
		}
		// tot[1]=kor[1]+eng[1]+mat[1];
		// avg[1]=tot[1];
		for (int i = 1; i <= 3; i++) {
			tot[i] = kor[i] + eng[i] + mat[i];
		}
		for (int i = 1; i <= 3; i++) {
			avg[i] = (double) tot[i] / 3;
		}
		for (int i = 1; i <= 3; i++) {
			switch ((int) avg[i] / 10) {
			case 10:
			case 9:
				grd[i] = '수';
				break;
			case 8:
				grd[i] = '우';
				break;
			case 7:
				grd[i] = '미';
				break;
			case 6:
				grd[i] = '양';
				break;
			default:
				grd[i] = '가';
			}
		}
		for (int i = 1; i <= 3; i++) {
			System.out.println("이름:" + name[i] + "\t국어 :" + kor[i] + "\t수학:"
					+ mat[i] + "\t영어:" + eng[i] + "\t학점:" + grd[i]);
		}
		// 결과출력
	}// main
}// class
